#ifndef _OHAI_TIME_FORMAT_H_
#define _OHAI_TIME_FORMAT_H_

/* Timestamp formatting routines.
 *
 * Copyright 2008 Cian Synnott.
 * 
 * $Id: time_format.h 19 2009-11-27 20:46:48Z cian $
 */

/* Gets the current time as a formatted string.
 *
 * The returned timestamp is allocated on the heap; the caller must free() it.
 *
 * Args:
 * - fmt: a strftime(3) format string
 * - global: true if you want GMT, false if you'd prefer localtime.
 * Returns:
 * - string representation of the timestamp, or NULL on failure
 */
char *time_formatted_by(char *fmt, int global);

#endif /* _OHAI_TIME_FORMAT_H */
